#include "TimeWaitState.hpp"

TimeWaitState::TimeWaitState
(
	double timeToWait
) :
	m_time(timeToWait),
	m_timer()
{
}

void TimeWaitState::InitializeImpl()
{
	m_timer.Reset();
	m_timer.Start();
}

void TimeWaitState::PeriodicImpl()
{
	if(m_timer.Get() > m_time)
		SetDoneCode(StateDoneCode::GetSuccessCode());
}
